import type { UploadUserFile } from "element-plus";
export interface AllSpuType<T = spuImageList | UploadUserFile | spuImageNeed> {
  category3Id?: number | undefined;
  description: string;
  id?: number | undefined;
  spuImageList: ArraySpuImageList<T>;
  spuName: string;
  spuSaleAttrList: ArraySpuSaleAttrList;
  tmId: number | undefined;
}
export type ArraySpuImageList<
  T = spuImageList | UploadUserFile | spuImageNeed
> = Array<T>;
export interface spuImageList {
  id?: number;
  imgName: string;
  imgUrl: string;
  spuId?: number;
  isDefault?: string;
}
export interface spuImageNeed {
  name: string;
  url: string;
}
// export interface uploadImageType {
//   name: string;
//   percentage: number;
//   raw: any;
//   response: { code: number; message: string; data: string; ok: boolean };
//   size: number;
//   status: string;
//   uid: number;
//   url: string;
// }

export interface spuSaleAttrlist {
  baseSaleAttrId?: number;
  id?: number | undefined;
  saleAttrName: string;
  spuId: number | undefined;
  spuSaleAttrValueList: [
    {
      baseSaleAttrId: number | undefined;
      id?: number;
      isChecked?: null | boolean;
      saleAttrName?: string;
      saleAttrValueName: string;
      spuId?: number;
    }
  ];
  isEdit?: boolean;
}
export type ArraySpuSaleAttrList = spuSaleAttrlist[];
